home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_11
/
phillip2
/
numcvrt.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-11
|
827b
|
62 lines
/******************************************
*
* file d:\cips\numcvrt.c
*
* Functions:
* get_integer
* get_short
* get_long
* get_float
*
* Purpose:
* These functions read numbers from
* the keyboard.
*
* Modifications:
* 12 May 1993 - recreated
*
*******************************************/
get_integer(n)
int *n;
{
char string[80];
gets(string);
*n = atoi(string);
}
get_short(n)
short *n;
{
char string[80];
gets(string);
*n = atoi(string);
}
get_long(n)
long *n;
{
char string[80];
gets(string);
*n = atol(string);
}
get_float(f)
float *f;
{
char string[80];
gets(string);
*f = atof(string);
}